package com.samsung.dto.common;

import java.io.Serializable;

/**
 * 
 *	@ClassName: BaseJsonResult
 *	@Description: 返回的Json請求
 *	@author pu.huang
 *	@date 2015年7月17日 上午10:04:04
 *
 */
public class BaseJsonResult implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 状态值[成功：true 失败：false]
	 */
	private boolean flag;
	/**
	 * 提示消息
	 */
	private String msg;
	/**
	 * 返回数据
	 */
	private Object data;
	
	public BaseJsonResult(boolean flag) {
		super();
		this.flag = flag;
	}

	public BaseJsonResult(boolean flag, String msg) {
		super();
		this.flag = flag;
		this.msg = msg;
	}

	public BaseJsonResult(boolean flag, Object data) {
		super();
		this.flag = flag;
		this.data = data;
	}

	public BaseJsonResult(boolean flag, String msg, Object data) {
		super();
		this.flag = flag;
		this.msg = msg;
		this.data = data;
	}

	public boolean getFlag() {
		return flag;
	}

	public void setFlag(boolean flag) {
		this.flag = flag;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	@Override
	public String toString() {
		return "JSuccDto [flag=" + flag + ", msg=" + msg + ", data=" + data
				+ "]";
	}
}
